import {IUserInfoDto} from "@/api/Types/ObjInterfaces.ts";

class TokenUtil {
    public parseToken = (token: string): IUserInfoDto => {
        let s = token.substring(0, token.lastIndexOf('.'));
        s = s.substring(s.lastIndexOf('.') + 1);
        s = atob(s);
        return JSON.parse(s).user
    }
}

export default new TokenUtil()